package com.zjcode.cdcer.mapper;

import com.zjcode.cdcer.model.CerDataScreen;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;

@Mapper
public interface CerDataScreenMapper {

    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(CerDataScreen record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(CerDataScreen record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    CerDataScreen selectByPrimaryKey(String id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CerDataScreen record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CerDataScreen record);

    int updateBatch(List<CerDataScreen> list);

    int updateBatchSelective(List<CerDataScreen> list);

    int batchInsert(@Param("list") List<CerDataScreen> list);

    LinkedHashMap<String, Object> queryDataScreen(@Param("year") String year,
                                                  @Param("month") String month);

    void deleteAllByCondition(@Param("year") String year, @Param("month") String month);

    LinkedHashMap<String, Object> selectAllBy(@Param("year") String year,
                                    @Param("month") String month,
                                    @Param("ext_flag") String ext_flag);

    List<CerDataScreen> selectAllByExtFlag(@Param("likeExt_flag")String likeExt_flag);




}
